<template>
  <div>
    <a-checkbox-group
      :options="option"
      v-model="myValue"
      :disabled="disabled"
    ></a-checkbox-group>
  </div>
</template>

<script>
import {dict} from '../api/common'
export default {
  name: "SpcyWebui319CheckboxGroup",
  props:{
    value:{
     
    },
    dictType:{
      type:String,
      default:""
    },
    disabled:{
      type:Boolean,
      default:false
    }
  },
  model:{
    prop:'value',
    event:'change'
  },
  data() {
    return {
      option:[],
      myValue:this.value
    };
  },

  mounted() {},

  methods: {
    handlerDict(dictType) {
      //console.log("获取字典");
      dict("mz001").then(res => {
        //console.log(res);
      })
    }
  },
  watch:{
    dictType:{
      immediate:true,
      handler() {
        if(this.dictType) {
          this.handlerDict(this.dictType)
        }
      }
    },
    myValue:{
      immediate:true,
      handler() {
        this.$emit('change',this.myValue)
      }
    }
  }
};
</script>

<style scoped></style>
